The field of the disclosure relates generally to database queries and more particularly to systems and methods for optimizing database queries involving tables divided into multiple partitions.
Large database tables may be separated into multiple sub-tables, or “partitions,” in order to improve performance or to enable aspects of cluster computing. Such partitioning may be implemented with a divisional scheme that groups data in each partition based on an attribute of the data (e.g., a field of the table, sometimes called a “partition field” or a “partition key”). For example, a table of weekly transactions may include a separate partition for each day of the week. As such, each partition includes only data related to a single day of the week.
Known database queries involving large database tables require querying all of the partitions in order to retrieve the data. Further, some queries may be formed using a filter (i.e., a limitation involving one or more fields of the table) that restricts certain rows of the table from the return result. In some instances, that filter field may also be the partition field.